package com.itc.dispatch.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itc.common.core.validate.Add;
import com.itc.common.core.validate.Delete;
import com.itc.common.core.validate.Update;
import com.itc.dispatch.domain.SysFlowType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 *
 * @TableName sys_alarm_type的Page类
 */
@Data
public class SysFlowTypePageDto extends Page {
    /**
     * 流程类型存储表主键id
     */

    @ApiModelProperty("流程类型存储表主键id")
    @NotNull(message = "主键id不能为空",groups = {Update.class, Delete.class})
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 流程类型名称
     */
    @ApiModelProperty("流程类型名称")
    @NotBlank(message = "流程类型名称不能为空",groups = {Add.class,Update.class})
    private String flowName;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private String createDate;



    /**
     * 0_正常，1_停用
     */
    @ApiModelProperty("0_正常，1_停用")
    @NotNull(message = "流程类型名称不能为空",groups = {Add.class,Update.class})
    private Integer status;

    /**
     * 权限标识
     */
    @ApiModelProperty("权限标识")
    @NotBlank(message = "权限标识不能为空",groups = {Add.class,Update.class})
    private String permissionIdentification;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    @NotNull(message = "排序不能为空",groups = {Add.class,Update.class})
    private Integer sort;

    /**
     * 0_正常，1_删除
     */
    @ApiModelProperty("0_正常，1_删除")
    private Integer delete;


    /**
     * 父级id
     */
    @ApiModelProperty("父级id,新增子集时传")
    private Long parentId;

    /**
     * 流程子集集合
     */
    @ApiModelProperty("流程子集集合")
    private List<SysFlowType> flowChildens;




    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
